﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: Tuesday, April 08, 2014 2:14:01 PM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace TuanHuy.DAL.HelperClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	
	
	/// <summary>
	/// Singleton implementation of the FieldInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.
	/// </summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the FieldInfoProviderBase class is threadsafe.</remarks>
	internal sealed class FieldInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IFieldInfoProvider _providerInstance = new FieldInfoProviderCore();
		#endregion
		
		/// <summary>private ctor to prevent instances of this class.</summary>
		private FieldInfoProviderSingleton()
		{
		}

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static FieldInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the FieldInfoProviderCore</summary>
		/// <returns>Instance of the FieldInfoProvider.</returns>
		public static IFieldInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the FieldInfoProvider. Used by singleton wrapper.</summary>
	internal class FieldInfoProviderCore : FieldInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="FieldInfoProviderCore"/> class.</summary>
		internal FieldInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores.</summary>
		private void Init()
		{
			base.InitClass( (7 + 0));
			InitCategoryEntityInfos();
			InitLanguageEntityInfos();
			InitProductsEntityInfos();
			InitProductsLanguageEntityInfos();
			InitProjectCatogeryEntityInfos();
			InitProjectsEntityInfos();
			InitProjectsLanguageEntityInfos();

			base.ConstructElementFieldStructures(InheritanceInfoProviderSingleton.GetInstance());
		}

		/// <summary>Inits CategoryEntity's FieldInfo objects</summary>
		private void InitCategoryEntityInfos()
		{
			base.AddElementFieldInfo("CategoryEntity", "CategoryId", typeof(System.Int32), true, false, true, false,  (int)CategoryFieldIndex.CategoryId, 0, 0, 10);
			base.AddElementFieldInfo("CategoryEntity", "CategoryName", typeof(System.String), false, false, false, true,  (int)CategoryFieldIndex.CategoryName, 250, 0, 0);
		}
		/// <summary>Inits LanguageEntity's FieldInfo objects</summary>
		private void InitLanguageEntityInfos()
		{
			base.AddElementFieldInfo("LanguageEntity", "Id", typeof(System.Decimal), true, false, false, false,  (int)LanguageFieldIndex.Id, 0, 0, 10);
			base.AddElementFieldInfo("LanguageEntity", "Language", typeof(System.String), false, false, false, false,  (int)LanguageFieldIndex.Language, 50, 0, 0);
		}
		/// <summary>Inits ProductsEntity's FieldInfo objects</summary>
		private void InitProductsEntityInfos()
		{
			base.AddElementFieldInfo("ProductsEntity", "ProductId", typeof(System.Decimal), true, false, false, false,  (int)ProductsFieldIndex.ProductId, 0, 0, 10);
			base.AddElementFieldInfo("ProductsEntity", "CreateDate", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)ProductsFieldIndex.CreateDate, 0, 0, 0);
		}
		/// <summary>Inits ProductsLanguageEntity's FieldInfo objects</summary>
		private void InitProductsLanguageEntityInfos()
		{
			base.AddElementFieldInfo("ProductsLanguageEntity", "Id", typeof(System.Decimal), true, false, false, false,  (int)ProductsLanguageFieldIndex.Id, 0, 0, 10);
			base.AddElementFieldInfo("ProductsLanguageEntity", "ProductId", typeof(Nullable<System.Decimal>), false, true, false, true,  (int)ProductsLanguageFieldIndex.ProductId, 0, 0, 10);
			base.AddElementFieldInfo("ProductsLanguageEntity", "CategoryId", typeof(Nullable<System.Int32>), false, true, false, true,  (int)ProductsLanguageFieldIndex.CategoryId, 0, 0, 10);
			base.AddElementFieldInfo("ProductsLanguageEntity", "LanguageId", typeof(Nullable<System.Decimal>), false, true, false, true,  (int)ProductsLanguageFieldIndex.LanguageId, 0, 0, 10);
			base.AddElementFieldInfo("ProductsLanguageEntity", "ProductName", typeof(System.String), false, false, false, true,  (int)ProductsLanguageFieldIndex.ProductName, 250, 0, 0);
			base.AddElementFieldInfo("ProductsLanguageEntity", "Descriptions", typeof(System.String), false, false, false, true,  (int)ProductsLanguageFieldIndex.Descriptions, 500, 0, 0);
			base.AddElementFieldInfo("ProductsLanguageEntity", "Price", typeof(Nullable<System.Double>), false, false, false, true,  (int)ProductsLanguageFieldIndex.Price, 0, 0, 38);
			base.AddElementFieldInfo("ProductsLanguageEntity", "Image", typeof(System.String), false, false, false, true,  (int)ProductsLanguageFieldIndex.Image, 500, 0, 0);
			base.AddElementFieldInfo("ProductsLanguageEntity", "Content", typeof(System.String), false, false, false, true,  (int)ProductsLanguageFieldIndex.Content, 2147483647, 0, 0);
		}
		/// <summary>Inits ProjectCatogeryEntity's FieldInfo objects</summary>
		private void InitProjectCatogeryEntityInfos()
		{
			base.AddElementFieldInfo("ProjectCatogeryEntity", "CatogeryId", typeof(System.Int32), true, false, false, false,  (int)ProjectCatogeryFieldIndex.CatogeryId, 0, 0, 10);
			base.AddElementFieldInfo("ProjectCatogeryEntity", "CatogeryName", typeof(System.String), false, false, false, true,  (int)ProjectCatogeryFieldIndex.CatogeryName, 250, 0, 0);
		}
		/// <summary>Inits ProjectsEntity's FieldInfo objects</summary>
		private void InitProjectsEntityInfos()
		{
			base.AddElementFieldInfo("ProjectsEntity", "ProjectId", typeof(System.Decimal), true, false, true, false,  (int)ProjectsFieldIndex.ProjectId, 0, 0, 10);
			base.AddElementFieldInfo("ProjectsEntity", "CreateDate", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)ProjectsFieldIndex.CreateDate, 0, 0, 0);
		}
		/// <summary>Inits ProjectsLanguageEntity's FieldInfo objects</summary>
		private void InitProjectsLanguageEntityInfos()
		{
			base.AddElementFieldInfo("ProjectsLanguageEntity", "Id", typeof(System.Decimal), true, false, true, false,  (int)ProjectsLanguageFieldIndex.Id, 0, 0, 18);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "ProjectId", typeof(Nullable<System.Decimal>), false, true, false, true,  (int)ProjectsLanguageFieldIndex.ProjectId, 0, 0, 10);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "LanguageId", typeof(System.String), false, false, false, true,  (int)ProjectsLanguageFieldIndex.LanguageId, 10, 0, 0);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "CategoryId", typeof(Nullable<System.Int32>), false, true, false, true,  (int)ProjectsLanguageFieldIndex.CategoryId, 0, 0, 10);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "Name", typeof(System.String), false, false, false, true,  (int)ProjectsLanguageFieldIndex.Name, 250, 0, 0);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "Descriptions", typeof(System.String), false, false, false, true,  (int)ProjectsLanguageFieldIndex.Descriptions, 2147483647, 0, 0);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "Image", typeof(System.String), false, false, false, true,  (int)ProjectsLanguageFieldIndex.Image, 250, 0, 0);
			base.AddElementFieldInfo("ProjectsLanguageEntity", "Content", typeof(System.String), false, false, false, true,  (int)ProjectsLanguageFieldIndex.Content, 2147483647, 0, 0);
		}
		
	}
}




